<%--
  Created by IntelliJ IDEA.
  User: owner
  Date: 2018-08-07
  Time: 11:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="indexCate" style="position: relative">
    <div class="indexCate_categy">
        <c:forEach items="${categories}" var="cat" varStatus="st">
            <div cid="c${cat.id}">
                <span class="glyphicon glyphicon-link"></span>
                <a href="forecategory?cid=${cat.id}&sort=all">
                        ${cat.name}
                </a>
            </div>
        </c:forEach>
    </div>
    <c:forEach items="${categories}" var="cat" varStatus="st1">
        <div class="indexCate_cate" cid="c${cat.id}">
            <c:forEach items="${cat.productsByRow}" var="row" varStatus="st2">
                <div class="row show1">
                    <c:forEach items="${row}" var="pro" varStatus="st3">
                        <c:if test="${!empty pro.subTitle}">
                            <a href="foreproduct?pid=${pro.id}">
                                <c:forEach items="${fn:split(pro.subTitle, ' ')}" var="title" varStatus="st">
                                    <c:if test="${st.index==0}">
                                        ${title}
                                    </c:if>
                                </c:forEach>
                            </a>
                        </c:if>
                    </c:forEach>
                </div>
            </c:forEach>
        </div>
    </c:forEach>
</div>
</nav>
